package com.SunSoft.PhoneRemoteControl;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.text.Editable;
import android.widget.AutoCompleteTextView;
import android.widget.EditText;
import android.widget.Toast;

final class bg
  implements DialogInterface.OnClickListener
{
  public final void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    try
    {
      paramDialogInterface = new Object[6];
      paramDialogInterface[0] = this.b.getText().toString();
      paramDialogInterface[1] = this.c.getText().toString();
      paramDialogInterface[2] = this.d.getText().toString();
      paramDialogInterface[3] = this.e.getText().toString();
      paramDialogInterface[4] = this.f.getText().toString();
      paramDialogInterface[5] = Integer.valueOf(this.a.T);
      if (MainControl.d)
      {
        MainControl.f(this.a).execSQL("update control_list set name_ch = ? ,brand_ch = ?,name_en= ? , brand_en= ? ,control_model = ? where ID= ? ", paramDialogInterface);
        Toast.makeText(this.a, this.a.getString(2131099802), 0).show();
        if (MainControl.d)
          return;
        this.a.b();
        return;
      }
      MainControl.i(this.a).execSQL("update control_list set name_ch = ? ,brand_ch = ? ,name_en= ? , brand_en= ? ,control_model = ? where ID= ? ", paramDialogInterface);
    }
    catch (SQLException paramDialogInterface)
    {
      paramDialogInterface.printStackTrace();
      Toast.makeText(this.a, this.a.getString(2131099803), 0).show();
    }
  }
}